package com.example.shopcommon.feign;

import com.example.shopcommon.dao.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "service-product")
public interface ProductFeignClient {

    @GetMapping("/product/get")
    public Product get(@RequestParam("pid") Long pid);

    @GetMapping("/product/deduct")
    public String deduct(@RequestParam("pid") Long pid, @RequestParam("num") int num);

}
